<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>LM Design</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="stmenu.js"></script>
</head>
<body>

<div class="bodybox">
<div class="headerbar_top"> You are logged in as ${currentUserDetails.name} !</div>
<div class="header">

</div>
<div class="wrapper">
<div class="navigation">
<a href="http://www.dhtml-menu-builder.com"  style="display:none;visibility:hidden;">Navigation Menu</a>
<s:set name="webFramework" value="#session['USERROLE']"/>
<s:if test="%{#webFramework=='Operator'}">
	<script type="text/javascript" src="operator.js"></script>
</s:if>
<s:if test="%{#webFramework=='Authorizer'}">
	<script type="text/javascript" src="authorizer.js"></script>
</s:if>

  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</div>

<!-- navigation end-->
<div class="content">
<h4>Edit Transaction</h4>

<table>
	<tr>
		<th class="left border" >Form ID</th>
	    <th class="left border">Location Code</th>
	    <th class="left border">Amount</th>
	    <th class="left border">Transaction Date</th>
	    <th class="left border">Person Name</th>
	    <th class="left border">Transaction Type</th>
	    <th class="left border">Status</th>
	    <th class="left border">Edit</th> 
	</tr>
	<s:iterator value="accounts" status="trx">
        <tr>
            <td class="nowrap">
            <%-- <s:url id="update" action="editTrx">
		       		   <s:param name="formId" value="formId"/>
		       		</s:url> 
                <s:a href="%{update}"> --%> 
                	<s:property value="formId"/>
               <%--  </s:a> --%>
           </td>
            <td class="nowrap"><s:property value="locName"/></td>
            <td class="nowrap"><s:property value="amount"/></td>
            <td class="nowrap"><s:property value="txDate"/></td>            
            <td class="nowrap"><s:property value="personName"/></td>
            <td class="nowrap"><s:property value="txTye"/></td>
            <td class="nowrap"><s:property value="status"/></td>  
             <td>
            	<s:url id="update" action="editTrx">
		       		   <s:param name="formId" value="formId"/>
		       		</s:url> 
                <s:a href="%{update}">Edit </s:a>
            </td> 
           <!-- <td></td> -->
        </tr>  		
	 </s:iterator>	
</table>
 
</div>
<!-- content end-->
</div> 
<!-- wrapper end-->
<div class="bottom_strip"></div>
<div class="headerbar_bottom">
&copy; Copyright 2011. Dera Sacha Sauda, Sirsa-125055 (Haryana)
<br />
Designed By: DSS IT WING</div>
</div>

<script type="text/javascript">
	function validateData(){
		var formid1 = document.getElementById('formId1').value;
		var location1 = document.getElementById('locationId').value;
		var trxDate = document.getElementsByName('dojo.txDate')[0].value;
		var checked = false;
		var buttons = document.getElementsByName('txTye');
		for (var i=0; i<buttons.length; i++) 
		{ 
		 if (buttons[i].checked) {				
		  checked = true;
		  break; 
		 } 
		}
		
		if((formid1==null || formid1=="") && (location1==null || location1=="") && (trxDate==null || trxDate=="") && (!checked)){
			alert("Please select atleast one filter condition");
			return false;
		}else{
			return true;
		}
		
	}
</script>

</body>
</html>